<template>
  <el-row class="pagination" type="flex" justify="center" align="middle">
    <el-pagination
      background
      layout="prev, pager, next"
      :total="total"
      :page-size="pageSize"
      @current-change="currentChange"
      :current-page="currentPage"
    >
    </el-pagination>
  </el-row>
</template>

<script>
export default {
  name: "PaginationComponent",
  props: {
    total: {
      type: Number,
      default: 0,
    },
    currentPage: {
      type: Number,
      default: 1,
    },
    pageSize: {
      type: Number,
      default: 6,
    },
  },
  methods: {
    currentChange(currentPage) {
      this.$emit("currentPageChange", currentPage);
    },
  },
};
</script>

<style scoped lang="scss">
.pagination {
  width: 100%;
  position: relative;
  bottom: 0px;
  margin-top: 15px;
  padding: 15px;
  box-shadow: -1px 0px 1px 1px rgba(0, 0, 0, 10%);
}
</style>
